<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script>
        let grade = prompt("请输入成绩");
        //单路分支
        // if (grade>=60){
        //     console.log("成绩合格");
        // }
        //双路分支
        // if (grade>=60&&grade<=100){
        //     console.log("成绩合格");
        // } else{
        //     console.log("成绩不合格");
        // }
        //多路分支
        if (grade >= 90 && grade <= 100) {
            console.log("优秀");
        } else if (grade >= 80 && grade < 90) {
            console.log("良好");
        } else if (grade >= 60 && grade < 80) {
            console.log("合格");
        } else if (grade >= 0 && grade < 60) {
            console.log("不及格");
        } else {
            console.log("成绩不合法");
        }
        //嵌套分支
        if (grade >= 0 && grade <= 100) {
            if (grade >= 60 ) {
                console.log("成绩合格");
            } else {
                console.log("成绩不合格");
            }
        } else {
            console.log("成绩不合规");
        }
    </script>
</head>

<body>

</body>

</html>